<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>splashscreen</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Metadata Crawler</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;splashscreen
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="splashscreen-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="splashscreen-module.html">Module splashscreen</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">This is the beginnings of a splash screen cos the GUI's in runcrawler.py and runtransforms.py take sooo long to start up...</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">===========================================================================================================================</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">Modified from Activestate Recipe 534124: Elegant Tkinter Splash Screen U{http://code.activestate.com/recipes/534124} </tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">by Luke Pinner (ERIN) to support threading &amp; callback functions.</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">'''</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt><tt class="py-op">,</tt><tt class="py-name">os</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">Tkinter</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="SplashScreen"></a><div id="SplashScreen-def"><a name="L11"></a><tt class="py-lineno">11</tt> <a class="py-toggle" href="#" id="SplashScreen-toggle" onclick="return toggle('SplashScreen');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="splashscreen.SplashScreen-class.html">SplashScreen</a><tt class="py-op">(</tt><tt class="py-base-class">threading</tt><tt class="py-op">.</tt><tt class="py-base-class">Thread</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SplashScreen-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="SplashScreen-expanded"><a name="SplashScreen.__init__"></a><div id="SplashScreen.__init__-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="SplashScreen.__init__-toggle" onclick="return toggle('SplashScreen.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.SplashScreen-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">imagefile</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">imagedata</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">timeout</tt><tt class="py-op">=</tt><tt class="py-number">0.001</tt><tt class="py-op">,</tt> <tt class="py-param">callback</tt><tt class="py-op">=</tt><tt class="py-keyword">lambda</tt><tt class="py-op">:</tt><tt class="py-name">True</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SplashScreen.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SplashScreen.__init__-expanded"><a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">     </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">imagefile</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">imagedata</tt><tt class="py-op">:</tt><tt class="py-comment">#raise Exception,'Image file name or base 64 encoded image data required!'</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line">            <tt class="py-comment">#imagefile=__file__[:-3]+'.gif' - this don't work cos __file__ might .pyc or .pyo not .py</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">imagefile</tt><tt class="py-op">=</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">splitext</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">+</tt><tt class="py-string">'.gif'</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">timeout</tt>   <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">callback</tt><tt class="py-op">:</tt> <tt class="py-keyword">raise</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt><tt class="py-string">'Timeout (secs) or boolean callback function required!'</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt>              <tt class="py-op">=</tt> <tt class="py-name">Tk</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_splash</tt>            <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">imagefile</tt><tt class="py-op">:</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_image</tt> <tt class="py-op">=</tt> <tt class="py-name">PhotoImage</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">=</tt><tt class="py-name">imagefile</tt><tt class="py-op">)</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_image</tt> <tt class="py-op">=</tt> <tt class="py-name">PhotoImage</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">=</tt><tt class="py-name">imagedata</tt><tt class="py-op">)</tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_timeout</tt>  <tt class="py-op">=</tt> <tt class="py-name">timeout</tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_callback</tt> <tt class="py-op">=</tt> <tt class="py-name">callback</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">        <tt class="py-name">threading</tt><tt class="py-op">.</tt><tt class="py-name">Thread</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Method crawler.Crawler.__init__()=crawler.Crawler-class.html#__init__,Method formats.__dataset__.Dataset.__init__()=formats.__dataset__.Dataset-class.html#__init__,Method formats.__default__.Dataset.__init__()=formats.__default__.Dataset-class.html#__init__,Method formats.ali_hyperion.Dataset.__init__()=formats.ali_hyperion.Dataset-class.html#__init__,Method formats.alos.Dataset.__init__()=formats.alos.Dataset-class.html#__init__,Method formats.aster.Dataset.__init__()=formats.aster.Dataset-class.html#__init__,Method formats.ccrs.Dataset.__init__()=formats.ccrs.Dataset-class.html#__init__,Method formats.envi.Dataset.__init__()=formats.envi.Dataset-class.html#__init__,Method formats.esribil.Dataset.__init__()=formats.esribil.Dataset-class.html#__init__,Method formats.esrigrid.Dataset.__init__()=formats.esrigrid.Dataset-class.html#__init__,Method formats.fast_l7a.Dataset.__init__()=formats.fast_l7a.Dataset-class.html#__init__,Method formats.quickbird.Dataset.__init__()=formats.quickbird.Dataset-class.html#__init__,Method formats.spot_dimap.Dataset.__init__()=formats.spot_dimap.Dataset-class.html#__init__,Method geometry.ShapeWriter.__init__()=geometry.ShapeWriter-class.html#__init__,Method progresslogger.ProgressBarView.__init__()=progresslogger.ProgressBarView-class.html#__init__,Method progresslogger.ProgressLogger.__init__()=progresslogger.ProgressLogger-class.html#__init__,Method progresslogger.ProgressLoggerGUI.__init__()=progresslogger.ProgressLoggerGUI-class.html#__init__,Method progresslogger.ProgressLoggerHandler.__init__()=progresslogger.ProgressLoggerHandler-class.html#__init__,Method progresslogger.ProgressLoggerServer.__init__()=progresslogger.ProgressLoggerServer-class.html#__init__,Method runcrawler.Command.__init__()=runcrawler.Command-class.html#__init__,Method runcrawler.GetArgs.__init__()=runcrawler.GetArgs-class.html#__init__,Method runtransform.Command.__init__()=runtransform.Command-class.html#__init__,Method runtransform.DropList.__init__()=runtransform.DropList-class.html#__init__,Method runtransform.GetArgs.__init__()=runtransform.GetArgs-class.html#__init__,Method splashscreen.CallBack.__init__()=splashscreen.CallBack-class.html#__init__,Method splashscreen.SplashScreen.__init__()=splashscreen.SplashScreen-class.html#__init__,Method utilities.ExcelWriter.__init__()=utilities.ExcelWriter-class.html#__init__,Method utilities.rglob.__init__()=utilities.rglob-class.html#__init__,Method uuid.UUID.__init__()=uuid.UUID-class.html#__init__"><a title="crawler.Crawler.__init__
formats.__dataset__.Dataset.__init__
formats.__default__.Dataset.__init__
formats.ali_hyperion.Dataset.__init__
formats.alos.Dataset.__init__
formats.aster.Dataset.__init__
formats.ccrs.Dataset.__init__
formats.envi.Dataset.__init__
formats.esribil.Dataset.__init__
formats.esrigrid.Dataset.__init__
formats.fast_l7a.Dataset.__init__
formats.quickbird.Dataset.__init__
formats.spot_dimap.Dataset.__init__
geometry.ShapeWriter.__init__
progresslogger.ProgressBarView.__init__
progresslogger.ProgressLogger.__init__
progresslogger.ProgressLoggerGUI.__init__
progresslogger.ProgressLoggerHandler.__init__
progresslogger.ProgressLoggerServer.__init__
runcrawler.Command.__init__
runcrawler.GetArgs.__init__
runtransform.Command.__init__
runtransform.DropList.__init__
runtransform.GetArgs.__init__
splashscreen.CallBack.__init__
splashscreen.SplashScreen.__init__
utilities.ExcelWriter.__init__
utilities.rglob.__init__
uuid.UUID.__init__" class="py-name" href="#" onclick="return doclink('link-0', '__init__', 'link-0');">__init__</a></tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">start</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="SplashScreen.run"></a><div id="SplashScreen.run-def"><a name="L29"></a><tt class="py-lineno">29</tt> <a class="py-toggle" href="#" id="SplashScreen.run-toggle" onclick="return toggle('SplashScreen.run');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.SplashScreen-class.html#run">run</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SplashScreen.run-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SplashScreen.run-expanded"><a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-comment"># Remove the app window from the display</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">withdraw</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line">        <tt class="py-comment"># Calculate the geometry to centre the splash image</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">scrnWt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">winfo_screenwidth</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">        <tt class="py-name">scrnHt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">winfo_screenheight</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">        <tt class="py-name">imgWt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_image</tt><tt class="py-op">.</tt><tt class="py-name">width</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">        <tt class="py-name">imgHt</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_image</tt><tt class="py-op">.</tt><tt class="py-name">height</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">        <tt class="py-name">imgXPos</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">scrnWt</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">imgWt</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-name">imgYPos</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">scrnHt</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">imgHt</tt> <tt class="py-op">/</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">overrideredirect</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module geometry=geometry-module.html"><a title="geometry" class="py-name" href="#" onclick="return doclink('link-1', 'geometry', 'link-1');">geometry</a></tt><tt class="py-op">(</tt><tt class="py-string">'+%d+%d'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">imgXPos</tt><tt class="py-op">,</tt> <tt class="py-name">imgYPos</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt class="py-name">Label</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">,</tt> <tt class="py-name">image</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_image</tt><tt class="py-op">,</tt> <tt class="py-name">cursor</tt><tt class="py-op">=</tt><tt class="py-string">'watch'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Method progresslogger.ProgressBarView.pack()=progresslogger.ProgressBarView-class.html#pack,Method runtransform.DropList.pack()=runtransform.DropList-class.html#pack"><a title="progresslogger.ProgressBarView.pack
runtransform.DropList.pack" class="py-name" href="#" onclick="return doclink('link-2', 'pack', 'link-2');">pack</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">        <tt class="py-comment"># Force Tk to draw the splash screen outside of mainloop()</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment">#self._splash.update()</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">deiconify</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># Become visible at the desired location</tt> </tt>
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method splashscreen.SplashScreen.__settimeout__()=splashscreen.SplashScreen-class.html#__settimeout__"><a title="splashscreen.SplashScreen.__settimeout__" class="py-name" href="#" onclick="return doclink('link-3', '__settimeout__', 'link-3');">__settimeout__</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">mainloop</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line"> </tt>
<a name="SplashScreen.__settimeout__"></a><div id="SplashScreen.__settimeout__-def"><a name="L53"></a><tt class="py-lineno">53</tt> <a class="py-toggle" href="#" id="SplashScreen.__settimeout__-toggle" onclick="return toggle('SplashScreen.__settimeout__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.SplashScreen-class.html#__settimeout__">__settimeout__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SplashScreen.__settimeout__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SplashScreen.__settimeout__-expanded"><a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt id="link-4" class="py-name" targets="Class int=int-class.html"><a title="int" class="py-name" href="#" onclick="return doclink('link-4', 'int', 'link-4');">int</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_timeout</tt><tt class="py-op">*</tt><tt class="py-number">1000</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Method splashscreen.SplashScreen.__poll__()=splashscreen.SplashScreen-class.html#__poll__"><a title="splashscreen.SplashScreen.__poll__" class="py-name" href="#" onclick="return doclink('link-5', '__poll__', 'link-5');">__poll__</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="SplashScreen.__poll__"></a><div id="SplashScreen.__poll__-def"><a name="L55"></a><tt class="py-lineno">55</tt> <a class="py-toggle" href="#" id="SplashScreen.__poll__-toggle" onclick="return toggle('SplashScreen.__poll__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.SplashScreen-class.html#__poll__">__poll__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="SplashScreen.__poll__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="SplashScreen.__poll__-expanded"><a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_callback</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-comment">#If the callback function returns True</tt> </tt>
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">destroy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_root</tt><tt class="py-op">.</tt><tt class="py-name">after</tt><tt class="py-op">(</tt><tt id="link-6" class="py-name"><a title="int" class="py-name" href="#" onclick="return doclink('link-6', 'int', 'link-4');">int</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_timeout</tt><tt class="py-op">*</tt><tt class="py-number">1000</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="splashscreen.SplashScreen.__poll__" class="py-name" href="#" onclick="return doclink('link-7', '__poll__', 'link-5');">__poll__</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"> </tt>
<a name="CallBack"></a><div id="CallBack-def"><a name="L61"></a><tt class="py-lineno">61</tt> <a class="py-toggle" href="#" id="CallBack-toggle" onclick="return toggle('CallBack');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="splashscreen.CallBack-class.html">CallBack</a><tt class="py-op">:</tt> </tt>
</div><div id="CallBack-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="CallBack-expanded"><a name="CallBack.__init__"></a><div id="CallBack.__init__-def"><a name="L62"></a><tt class="py-lineno">62</tt> <a class="py-toggle" href="#" id="CallBack.__init__-toggle" onclick="return toggle('CallBack.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.CallBack-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt><tt class="py-param">value</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CallBack.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="CallBack.__init__-expanded"><a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">value</tt> </tt>
</div><a name="CallBack.check"></a><div id="CallBack.check-def"><a name="L64"></a><tt class="py-lineno">64</tt> <a class="py-toggle" href="#" id="CallBack.check-toggle" onclick="return toggle('CallBack.check');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="splashscreen.CallBack-class.html#check">check</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CallBack.check-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="CallBack.check-expanded"><a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">value</tt> </tt>
</div></div><a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line"> </tt>
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line"><tt class="py-keyword">if</tt> <tt class="py-name">__name__</tt><tt class="py-op">==</tt><tt class="py-string">'__main__'</tt><tt class="py-op">:</tt> </tt>
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Variable uuid.UUID.time=uuid.UUID-class.html#time"><a title="uuid.UUID.time" class="py-name" href="#" onclick="return doclink('link-8', 'time', 'link-8');">time</a></tt><tt class="py-op">,</tt><tt class="py-name">sys</tt><tt class="py-op">,</tt><tt class="py-name">os</tt> </tt>
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line">    <tt class="py-name">c</tt><tt class="py-op">=</tt><tt id="link-9" class="py-name" targets="Class splashscreen.CallBack=splashscreen.CallBack-class.html"><a title="splashscreen.CallBack" class="py-name" href="#" onclick="return doclink('link-9', 'CallBack', 'link-9');">CallBack</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line">    <tt class="py-name">splash</tt><tt class="py-op">=</tt><tt id="link-10" class="py-name" targets="Class splashscreen.SplashScreen=splashscreen.SplashScreen-class.html"><a title="splashscreen.SplashScreen" class="py-name" href="#" onclick="return doclink('link-10', 'SplashScreen', 'link-10');">SplashScreen</a></tt><tt class="py-op">(</tt><tt class="py-name">callback</tt><tt class="py-op">=</tt><tt class="py-name">c</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method splashscreen.CallBack.check()=splashscreen.CallBack-class.html#check"><a title="splashscreen.CallBack.check" class="py-name" href="#" onclick="return doclink('link-11', 'check', 'link-11');">check</a></tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'Yawn... I'</tt><tt class="py-string">'m going to sleep now!'</tt> </tt>
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line">    <tt id="link-12" class="py-name"><a title="uuid.UUID.time" class="py-name" href="#" onclick="return doclink('link-12', 'time', 'link-8');">time</a></tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">5</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line">    <tt class="py-keyword">print</tt> <tt class="py-string">'Stretch... I'</tt><tt class="py-string">'m awake now!'</tt> </tt>
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">    <tt class="py-name">c</tt><tt class="py-op">.</tt><tt class="py-name">value</tt><tt class="py-op">=</tt><tt class="py-name">True</tt> </tt>
<a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Metadata Crawler</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Oct 07 14:35:46 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
